package algorithms;

import edu.princeton.cs.algs4.In;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @功能
 * @创建时间 2020/5/26
 */
public class Test {
    public static void main(String[] args) {
        String[][] ww = {{"untwists"},{"eternities"},{"wreckers"},{"coordinated"},{"repellents"},{"balsamed"},{"masterminded"},{"tented"},{"overlaying"},{"whelps"},{"pizza"},{"residential"},{"waxwing"},{"pot"},{"labyrinthine"},{"sake"},{"deputations"},{"obscurely"},{"businessmen"},{"cyclical"},{"kneecaps"},{"emeritus"},{"resonances"},{"refinery"},{"zapata"},{"behalf"},{"decriminalizes"},{"juiciest"},{"guppy"},{"easters"},{"emits"},{"furbelow"},{"linus"},{"vilyui"},{"loomed"},{"deciphered"},{"bipartisan"},{"bewailed"},{"distillation"},{"pacesetters"},{"syllable"},{"bring"},{"selectric"},{"bluefish"},{"dublin"},{"stopcocks"},{"grander"},{"breastbones"},{"unhurried"},{"perihelion"},{"clinker"},{"balkiest"},{"southey"},{"ransacked"},{"clearing"},{"airbrushes"},{"muftis"},{"ravenously"},{"artworks"},{"garvey"},{"funny"},{"grudgingly"},{"collateral"},{"posy"},{"tamed"},{"dampen"},{"gonads"},{"hunching"},{"earthing"},{"mandalay"},{"kinetic"},{"rodgers"},{"wimple"},{"hover"},{"snippy"},{"puzzling"},{"jagiellon"},{"thesauri"},{"commence"},{"claimant"},{"supervision"},{"gawking"},{"conservationists"},{"copulated"},{"cains"},{"doorbells"},{"orgasm"},{"pram"},{"persia"},{"cudgeling"},{"rheas"},{"gabon"},{"unbolt"},{"wail"},{"weakness"},{"bettering"},{"masterpiece"},{"marketable"},{"beaus"},{"heavier"},{"widening"},{"shakedown"},{"consumed"},{"traits"},{"inbred"},{"neighborhoods"},{"highboy"},{"adamant"},{"batsmen"},{"gaits"},{"juts"},{"powerhouses"},{"gags"},{"ranks"},{"aphids"},{"estrangements"},{"congregate"},{"videodiscs"},{"dervish"},{"overtaxed"},{"interpreted"},{"foreordain"},{"ebullience"},{"insurance"},{"moussorgsky"},{"crap"},{"housetop"},{"cajun"},{"relegates"},{"codification"},{"conglomerate"},{"harpooned"},{"overjoying","overjoying"},{"shack"},{"disturbance"},{"witty"},{"derision"},{"joke"},{"instrumentals"},{"richly"},{"angelica"},{"sputtered"},{"kielbasas"},{"memorize"},{"eroticism"},{"compassed"},{"communique"},{"canaries"},{"rendezvousing"},{"serenest"},{"deafen"},{"daiquiri"},{"rustics"},{"elton"},{"edited"},{"lactated","lactated"},{"indubitably"},{"riffraff"},{"backdate"},{"stampeded"},{"spoonerisms"},{"semite"},{"fertilizers"},{"moorish"},{"centered"},{"ulcerating"},{"coddle"},{"knacking"},{"prostrated"},{"bedpan"},{"bungalow"},{"numbers"},{"schoolmate"},{"bootblacks"},{"gracious"},{"abuts"},{"rose"},{"rumor"},{"regionalism"},{"honors"},{"shepherdess"},{"spices"},{"sofas"},{"bifocals"},{"definitions"},{"ware"},{"balanchine"},{"monastic"},{"kirghiz"},{"grandson"},{"calibrates"},{"proprietresses"},{"pueblos"},{"vacating"},{"concretely"},{"excruciating"},{"delusive"},{"galen"},{"foremost"},{"oceanic"},{"melodically"},{"encroachments"},{"tangibles"},{"sultrier"},{"dodoes"},{"ambiguities"},{"etymology"},{"complainants"},{"behalves"},{"stepchild"},{"horology"},{"paralyzed"},{"tramps","tramps"},{"inflectional"},{"swamies"},{"margret"},{"arriving"},{"preteen"},{"superintends"},{"ijsselmeer"},{"gambolled"},{"desolated"},{"starr"},{"alabamans"},{"uncouples"},{"rectal"},{"rises"},{"busywork"},{"faulkner"},{"capabler"},{"umping"},{"wigwag"},{"eardrums"},{"permitted"},{"stiflings","stiflings"},{"deodorizer"},{"lodgings"},{"arias"},{"extinguished"},{"jaundiced"},{"tangling"},{"shadowing"},{"hint"},{"darby"},{"compilations"},{"apprises"},{"lefty"},{"gemstones"},{"temblors"},{"bluejacket"},{"zirconium"},{"linnaeus"},{"snots"},{"gingersnaps"},{"batiks"},{"mastoids"},{"cursores"},{"map"},{"torches"},{"confederacies"},{"cheesecakes"},{"aftereffects"},{"pathologist"},{"dotingly"},{"epicure"},{"clinches"},{"flooding"},{"clarendon"},{"agglomerations"},{"case"},{"hashish"},{"teamed"},{"elanor"},{"foci"},{"surfboards"},{"anastasia"},{"overextended"},{"smarten"},{"lifework"},{"swoop"},{"exalted"},{"minimalism"},{"tirelessly"},{"swellheaded"},{"repackage","repackage"},{"skyrocketed"},{"vainglory"},{"voile"},{"wagging"},{"sifts"},{"blindsided"},{"peters"},{"statistics"},{"ay"},{"ratliff"},{"renovations"},{"speccing"},{"portray"},{"wraths"},{"concerto"},{"complicity"},{"dissolved"},{"scale"},{"exonerate"},{"psalms"},{"gowns"},{"pogroms"},{"warfare"},{"cornered"},{"dialectal"},{"craters"},{"weeknight"},{"idleness"},{"songster"},{"confessions"},{"repentant"},{"streamer"},{"archetypal"},{"waxwork"},{"mislay"},{"irreparably"},{"rhea"},{"biplane"},{"unseemly"},{"sequence"},{"kansan"},{"dotted"},{"hastiness"},{"overeager"},{"emitted"},{"alumnus"},{"squatter"},{"pandora"},{"aureomycin"},{"stockades"},{"aggravated"},{"bierce"},{"gringo"},{"hubris"},{"lambastes"},{"jerusalem"},{"megalomaniacs"},{"wart"},{"swopped"},{"merrimack"},{"dandelions"},{"blaspheme"},{"sufferer"},{"overcompensate"},{"canaan"},{"omnibusses"},{"pares"},{"ardent","ranted"},{"lummox"},{"rowdies"},{"interject"},{"portage"},{"rejections"},{"bust"},{"concur"},{"oxymoron"},{"pete"},{"scad"},{"sejong"},{"plume"},{"not"},{"tameness"},{"consumings"},{"rowdyism"},{"contracted"},{"cultivation"},{"supplementary"},{"macabre"},{"restfulness"},{"warheads"},{"lassa"},{"simulations"},{"unhand"},{"bournemouth"},{"blurry"},{"portfolios"},{"concessions"},{"retold"},{"petrifaction"},{"yawl"},{"crunching"},{"varying"},{"larkspurs"},{"bullying"},{"clanks"},{"unzipping"},{"attaching"},{"ryder"},{"shiny"},{"incompetents"},{"laziest"},{"antiqued"},{"fumigating"},{"assessments"},{"simulated"},{"impressiveness"},{"vitreous"},{"briefest"},{"vicissitude"},{"eskimo"},{"shipbuilders"},{"gabbles"},{"dialed"},{"dimensions"},{"motivational"},{"cormorants"},{"spineless"},{"refurnishes"},{"chappaquiddick"},{"desertions"},{"trinket"},{"bidets"},{"mods"},{"recollected"},{"lessors"},{"parsed"},{"foretasted"},{"subjugated"},{"rumpuses"},{"lorrie"},{"annotations"},{"junta"},{"magnet"},{"chutney"},{"vocational"},{"squareness"},{"diabetic"},{"edit"},{"ought"},{"losing"},{"banns"},{"doleful"},{"excreting"},{"embodied"},{"foals"},{"breaks"},{"soliciting"},{"pooching"},{"parties"},{"confesses"},{"soggily"},{"livelongs"},{"martinets"},{"gabrielle"},{"faded"},{"utilize"},{"ballsier"},{"brigs"},{"dvina"},{"croissants"},{"constructing"},{"rukeyser"},{"federate"},{"crummier"},{"thanklessly"},{"belittling"},{"staffers"},{"limeades"},{"criers"},{"syphilitics"},{"jaundicing"},{"tonsillectomies"},{"innocence"},{"nosedove"},{"adultery"},{"jephthah"},{"wiper"},{"precision"},{"compatible"},{"brightness"},{"gestates"},{"semi"},{"inmate"},{"onlookers"},{"flimsier"},{"recipe"},{"brightening"},{"sobs"},{"lizzie"},{"karenina"},{"mumble"},{"pane"},{"chaise"},{"declensions"},{"chummiest"},{"kirov"},{"snobbish"},{"crawlspaces"},{"reemerged"},{"paradigmatic"},{"inappropriate"},{"lie"},{"luau"},{"continence"},{"hydrogenate"},{"evasive"},{"joyridden"},{"acclimatized"},{"expediters"},{"harmonizing"},{"guinevere"},{"demanded"},{"brainteaser"},{"creamers"},{"upholds"},{"snowbelt"},{"walt"},{"animations"},{"ultra"},{"limoges"},{"limbos"},{"tranquil"},{"windbreakers"},{"barometer"},{"signs"},{"prisoning"},{"green"},{"derisive"},{"hopping"},{"homosexual"},{"devotional"},{"residue"},{"brazenly"},{"forbiddingly"},{"alfredo"},{"takeovers"},{"glummest"},{"eisenstein"},{"beets"},{"syntactics"},{"shapeliness"},{"capers"},{"disenfranchisement"},{"monogamous"},{"impoverishes"},{"unsuccessfully"},{"rocky"},{"reputation"},{"sledgehammer"},{"benchmarks"},{"escutcheon"},{"mandolins"},{"raspy"},{"bombarding"},{"augusts"},{"perishes"},{"traditionalists"},{"bothered"},{"seasonings"},{"organically"},{"ambulatories"},{"orly"},{"kinking"},{"grenadiers"},{"corroboration"},{"mussed"}};
        String[][] ee = {{"compilations"},{"bewailed"},{"horology"},{"lactated","lactated"},{"blindsided"},{"swoop"},{"foretasted"},{"ware"},{"abuts"},{"stepchild"},{"arriving"},{"magnet"},{"vacating"},{"relegates"},{"scale"},{"melodically"},{"proprietresses"},{"parties"},{"ambiguities"},{"bootblacks"},{"shipbuilders"},{"umping"},{"belittling"},{"lefty"},{"foremost"},{"bifocals"},{"moorish"},{"temblors"},{"edited"},{"hint"},{"serenest"},{"rendezvousing"},{"schoolmate"},{"fertilizers"},{"daiquiri"},{"starr"},{"federate"},{"rectal"},{"case"},{"kielbasas"},{"monogamous"},{"inflectional"},{"zapata"},{"permitted"},{"concessions"},{"easters"},{"communique"},{"angelica"},{"shepherdess"},{"jaundiced"},{"breaks"},{"raspy"},{"harpooned"},{"innocence"},{"craters"},{"cajun"},{"pueblos"},{"housetop"},{"traits"},{"bluejacket"},{"pete"},{"snots"},{"wagging"},{"tangling"},{"cheesecakes"},{"constructing"},{"balanchine"},{"paralyzed"},{"aftereffects"},{"dotingly"},{"definitions"},{"renovations"},{"surfboards"},{"lifework"},{"knacking"},{"apprises"},{"minimalism"},{"skyrocketed"},{"artworks"},{"instrumentals"},{"eardrums"},{"hunching"},{"codification"},{"vainglory"},{"clarendon"},{"peters"},{"weeknight"},{"statistics"},{"ay"},{"aureomycin"},{"lorrie"},{"compassed"},{"speccing"},{"galen"},{"concerto"},{"rocky"},{"derision"},{"exonerate"},{"sultrier"},{"mastoids"},{"repackage","repackage"},{"cyclical"},{"gowns"},{"regionalism","seasonings"},{"supplementary"},{"bierce"},{"darby"},{"memorize"},{"songster"},{"biplane"},{"calibrates"},{"decriminalizes"},{"shack"},{"idleness"},{"confessions"},{"snippy"},{"barometer"},{"earthing"},{"sequence"},{"hastiness"},{"emitted"},{"superintends"},{"stockades"},{"busywork"},{"dvina"},{"aggravated"},{"furbelow"},{"hashish"},{"overextended"},{"foreordain"},{"lie"},{"insurance"},{"recollected"},{"interpreted"},{"congregate"},{"ranks"},{"juts"},{"dampen"},{"gaits"},{"eroticism"},{"neighborhoods"},{"perihelion"},{"simulations"},{"fumigating"},{"balkiest"},{"semite"},{"epicure"},{"heavier"},{"masterpiece"},{"bettering"},{"lizzie"},{"wail"},{"batsmen"},{"unbolt"},{"cudgeling"},{"bungalow"},{"behalves"},{"refurnishes"},{"pram"},{"spoonerisms"},{"cornered"},{"rises"},{"encroachments"},{"gabon"},{"cultivation"},{"parsed"},{"takeovers"},{"stampeded"},{"persia"},{"devotional"},{"doorbells"},{"psalms"},{"cains"},{"copulated"},{"archetypal"},{"cursores"},{"inbred"},{"paradigmatic"},{"thesauri"},{"rose"},{"stopcocks"},{"weakness"},{"ballsier"},{"jagiellon"},{"torches"},{"hover"},{"conservationists"},{"brightening"},{"dotted"},{"rodgers"},{"mandalay"},{"overjoying","overjoying"},{"supervision"},{"gonads"},{"portage"},{"crap"},{"capers"},{"posy"},{"collateral"},{"funny"},{"garvey"},{"ravenously"},{"arias"},{"kirghiz"},{"elton"},{"gambolled"},{"highboy"},{"kneecaps"},{"southey"},{"etymology"},{"overeager"},{"numbers"},{"ebullience"},{"unseemly"},{"airbrushes"},{"excruciating"},{"gemstones"},{"juiciest"},{"muftis"},{"shadowing"},{"organically"},{"plume"},{"guppy"},{"obscurely"},{"clinker"},{"confederacies"},{"unhurried"},{"monastic"},{"witty"},{"breastbones"},{"ijsselmeer"},{"dublin"},{"linnaeus"},{"dervish"},{"bluefish"},{"selectric"},{"syllable"},{"pogroms"},{"pacesetters"},{"anastasia"},{"pandora"},{"foci"},{"bipartisan"},{"loomed"},{"emits"},{"gracious"},{"warfare"},{"uncouples"},{"augusts"},{"portray"},{"refinery"},{"resonances"},{"expediters"},{"deputations"},{"indubitably"},{"richly"},{"motivational"},{"gringo"},{"hubris"},{"mislay"},{"scad"},{"lambastes"},{"reemerged"},{"wart"},{"zirconium"},{"linus"},{"moussorgsky"},{"swopped"},{"sufferer"},{"sputtered"},{"tamed"},{"merrimack"},{"conglomerate"},{"blaspheme"},{"overcompensate"},{"rheas"},{"pares"},{"ranted","ardent"},{"prisoning"},{"rumor"},{"gabbles"},{"lummox"},{"unzipping"},{"tirelessly"},{"backdate"},{"puzzling"},{"interject"},{"rejections"},{"bust"},{"centered"},{"oxymoron"},{"tangibles"},{"sejong"},{"not"},{"tameness"},{"consumings"},{"prostrated"},{"rowdyism"},{"macabre"},{"rustics"},{"dodoes"},{"warheads"},{"wraths"},{"bournemouth"},{"staffers"},{"retold"},{"stiflings","stiflings"},{"petrifaction"},{"larkspurs"},{"crunching"},{"clanks","kansan"},{"briefest"},{"clinches"},{"attaching"},{"extinguished"},{"ryder"},{"shiny"},{"antiqued"},{"gags"},{"assessments"},{"simulated"},{"dialed"},{"confesses"},{"livelongs"},{"dimensions"},{"lodgings"},{"cormorants"},{"canaries"},{"spineless"},{"widening"},{"chappaquiddick"},{"blurry"},{"lassa"},{"vilyui"},{"desertions"},{"trinket"},{"teamed"},{"bidets"},{"mods"},{"lessors"},{"impressiveness"},{"subjugated"},{"rumpuses"},{"swamies"},{"annotations"},{"batiks"},{"ratliff"},{"waxwork"},{"grander"},{"junta"},{"chutney"},{"exalted"},{"yawl"},{"joke"},{"vocational"},{"diabetic"},{"bullying"},{"edit"},{"losing"},{"banns"},{"doleful"},{"precision"},{"excreting"},{"foals"},{"smarten"},{"soliciting"},{"disturbance"},{"soggily"},{"gabrielle"},{"margret"},{"faded"},{"pane"},{"jerusalem"},{"bedpan"},{"overtaxed"},{"brigs"},{"honors"},{"croissants"},{"kirov"},{"crummier"},{"limeades"},{"grandson"},{"criers"},{"bring"},{"jaundicing"},{"omnibusses"},{"gawking"},{"tonsillectomies"},{"deodorizer"},{"nosedove"},{"commence"},{"faulkner"},{"adultery"},{"shakedown"},{"wigwag"},{"wiper"},{"compatible"},{"ultra"},{"adamant"},{"distillation"},{"gestates"},{"semi"},{"inmate"},{"onlookers"},{"grudgingly"},{"recipe"},{"chaise"},{"dialectal"},{"aphids"},{"flimsier"},{"orgasm"},{"sobs"},{"swellheaded"},{"utilize"},{"karenina"},{"irreparably"},{"preteen"},{"mumble"},{"gingersnaps"},{"alumnus"},{"chummiest"},{"snobbish"},{"crawlspaces"},{"inappropriate"},{"ought"},{"continence"},{"hydrogenate"},{"eskimo"},{"desolated"},{"oceanic"},{"evasive"},{"sake"},{"laziest"},{"tramps","tramps"},{"joyridden"},{"acclimatized"},{"riffraff"},{"thanklessly"},{"harmonizing"},{"guinevere"},{"demanded"},{"capabler"},{"syphilitics"},{"brainteaser"},{"creamers"},{"upholds"},{"walt"},{"luau"},{"deafen"},{"concretely"},{"unhand"},{"animations"},{"map"},{"limbos"},{"tranquil"},{"windbreakers"},{"limoges"},{"varying"},{"declensions"},{"signs"},{"green"},{"snowbelt"},{"homosexual"},{"hopping"},{"residue"},{"ransacked"},{"emeritus"},{"pathologist"},{"brazenly"},{"forbiddingly"},{"alfredo"},{"glummest"},{"deciphered"},{"delusive"},{"repentant"},{"complainants"},{"beets"},{"syntactics"},{"vicissitude"},{"incompetents"},{"concur"},{"canaan"},{"rowdies"},{"streamer"},{"martinets","eisenstein"},{"shapeliness"},{"videodiscs"},{"restfulness"},{"rhea"},{"consumed"},{"pooching"},{"disenfranchisement"},{"impoverishes"},{"behalf"},{"unsuccessfully"},{"complicity"},{"ulcerating"},{"derisive"},{"jephthah"},{"clearing"},{"reputation"},{"sledgehammer"},{"benchmarks"},{"escutcheon"},{"portfolios"},{"mandolins"},{"marketable"},{"megalomaniacs"},{"kinking"},{"bombarding"},{"wimple"},{"perishes"},{"rukeyser"},{"squatter"},{"coddle"},{"traditionalists"},{"sifts"},{"agglomerations"},{"brightness"},{"spices"},{"claimant"},{"sofas"},{"ambulatories"},{"bothered"},{"businessmen"},{"orly"},{"kinetic"},{"contracted"},{"grenadiers"},{"flooding"},{"dissolved"},{"corroboration"},{"mussed"},{"squareness"},{"alabamans"},{"dandelions"},{"labyrinthine"},{"pot"},{"waxwing"},{"residential"},{"pizza"},{"whelps"},{"overlaying"},{"elanor"},{"tented"},{"masterminded"},{"balsamed"},{"powerhouses"},{"voile"},{"repellents"},{"beaus"},{"coordinated"},{"wreckers"},{"eternities"},{"untwists"},{"estrangements"},{"vitreous"},{"embodied"}};
    //        Integer[] a=new Integer[3];
//        Integer b;
//        Integer c;
//        a[0]=1;
//        a[2]=2;
//        a[1]=3;
//        b=a[0];
//        a[0]=a[1];
//        a[1]=b;
//        System.out.println(a[0]+""+a[1]);
//     double t = 9.0;
//     while (Math.abs(t-9.0/t)>.001)
//         t=(9.0/t+t)/2.0;
//        System.out.println(t);
        // 测试除法
//        int n =2;
//        n/=4;
//        System.out.println(n);
        //初始化数组，行列和为偶数时true,奇数时为false。
        //布尔数组
//        int rowLen=6;
//        int colLen=7;
//        boolean[][] array=new boolean[rowLen][colLen];
//        for (int row=0;row<rowLen;row++)
//            for (int col=0;col<colLen;col++)
//                array[row][col]=(row+col)%2==0;
//        //打印列号
//        System.out.print(" ");
//        for (int col=0;col<colLen;col++)
//            System.out.print(col);
//        System.out.print("\n");
//        //打印行号与数组元素值
//        for (int row=0;row<rowLen;row++)
//        {
//            System.out.print(row);
//            for (int col=0;col<colLen;col++)
//            {
//                if (array[row][col])
//                    System.out.print("*");
//                else
//                    System.out.print(" ");
//            }
//            System.out.print("\n");
//        }
        //数组转置
//        int[][] a=  new int[2][3];
//        for(int i=0;i<2;i++)
//            for (int j=0;j<3;j++)
//                a[i][j]=j;
//            int[][] b = new int[3][2];
//        for(int i=0;i<2;i++)
//            for (int j=0;j<3;j++)
//                b[j][i] =a[i][j];
//        System.out.println(b[2][1]);
//        System.out.println(a[1][2]);
  //      lg(4);
//        ExecutorService service=new ThreadPoolExecutor(0,
//                8,
//                2,
//                TimeUnit.MINUTES,
//                new LinkedBlockingDeque<>(52));
    }
//    public static int lg(int n){
//        int w = -1;
//  //      double p =Math.log(n)/Math.log(2);
//        if(n==1){
//            return 0;
//        }
//        if(n<2){
//            return -1;
//        }
//        int p=1;
//       for (int emm=2;emm<n;emm*=2)
//           p++;
//        System.out.println(p);
//        if(p)
//        return w;
//    }
}
